<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
    <title>
      Adding a new JRE definition
    </title>
    <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
    <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
  </head>
  <body>
    <h1>
      Adding a New JRE Definition
    </h1>
    <p>
    In your workspace you can have any number of JRE definitions. You can also add as many JRE definitions as you want.</p>
    <h2> to Add a New JRE Definition: </h2>
    
    <ol>
  <li> Open the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.debug.ui.preferences.VMPreferencePage)")'> 
    <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="Opens the Installed JREs preference page"> 
    <strong>Java &gt; Installed JREs</strong></a> preference page. </li>
  <li> Select the&nbsp;<strong>Add...</strong> button. The Add JRE wizard opens. </li>
  <li> You will have to select the type of JRE you would like to create:
  <ul>
  	<li> <a href="#StdVM"><strong>Standard VM</strong></a> - You will select a folder where the JRE is installed.  The details of the JRE will be determined
	by scanning the location.  You can further customize the JRE install, specifying vm arguments, source attachments, etc.</li>
	<li> <a href="#StdVM1x"><strong>Standard VM 1.x.x</strong></a> - Same options as a standard VM install, but the install is customized to handle the 1.x.x install</li>
	<li> <a href="#EEFile"><strong>Execution Environment Description</strong></a> - You will select an execution environment (EE) file that describes all the details required to set up the JRE.  You will be able
	to customize some aspects of the install.</li>
  </ul>
  </li>
  </ol>
  
  <a name="StdVM"></a>
  <h2>Standard VM:</h2>
  
  <ol>
  <li> In the <strong>JRE home</strong> field, click <strong>Browse... 
    </strong> to select a path to the root directory of a JRE installation 
    (usually the directory containing the <em>bin</em> and <em>lib</em> 
    directories for the JRE). You may also type a folder name 
    into this field.</li>
  <li> In the <strong>JRE name</strong> field, type a name for the new JRE 
    definition. All JREs of the same type must have a unique name. </li>
  <li> In the <strong>Default VM Arguments</strong> field, you can add/edit the default
  arguments that will be passed to the VM when launching.</li>
  <li> The default libraries appear for the JRE in the JRE system libraries list. 
    You can modify the libraries as desired. 
    <ul>
      <li>Source and javadoc locations can be specified for the referenced JARs. 
        The Javadoc location is used by the Javadoc export wizard as a default 
        value and by the 'Open External Javadoc' action. </li>
      <li>Jars can be added, removed, and reordered.</li>
    </ul>
  </li>
  <li> Click <strong>Finish</strong> when you are done. </li>
</ol>

  <img src="../tasks/images/task-add_jre_std_vm.PNG" alt="Add Standard VM JRE" width="419" height="552">
  
  <a name="StdVM1x"></a>
  <h2>Standard 1.1.x VM:</h2>
  
  <p> Follow the same steps as for <a href="#StdVM"><strong>Standard VM</strong></a> JREs.</p>
  
  <a name="EEFile"></a>
  <h2>Execution Environment Files:</h2>
  
	<p>For more information on EE File structure see the <a href="http://wiki.eclipse.org/index.php/Execution_Environment_Descriptions">Wiki Page</a>.</p>

	<ol>
  <li> In the <strong>Definition home directory</strong> field, click <strong>File... 
    </strong> to select a execution environment description file to load the JRE
	installation from.  You may also type a file path into this field.</li>
  <li> In the <strong>JRE name</strong> field, type a name for the new JRE 
    definition. All JREs of the same type must have a unique name. </li>
  <li> In the <strong>Default VM Arguments</strong> field, you can add/edit the default
  arguments that will be passed to the VM when launching.</li>
  <li> The default libraries appear for the JRE in the JRE system libraries list. 
    You can modify the libraries as desired. 
    <ul>
      <li>Source and javadoc locations can be specified for the referenced JARs. 
        The Javadoc location is used by the Javadoc export wizard as a default 
        value and by the 'Open External Javadoc' action. </li>
      <li>Jars can be added, removed, and reordered.</li>
    </ul>
  </li>
  <li> Click <strong>Finish</strong> when you are done. </li>
</ol>

<img src="../tasks/images/task-add_jre_ee_file.PNG" alt="Add EE File JRE" width="419" height="593">

  <h3 class="related">Related Concepts</h3>
      <a href="../concepts/concept-jdt.htm">Java development tools (JDT)</a>
  <h3 class="related">Related Tasks</h3>
      <a href="../tasks/tasks-JREs.htm">Working with JREs</a><br>
      <a href="tasks-deleteJRE.htm">Deleting a JRE definition</a><br>
      <a href="../tasks/task-assign_default_jre.htm">Choosing a default JRE</a><br>
      <a href="../tasks/task-choose_config_jre.htm">Choosing a JRE for launching a project</a>
  <h3 class="related">Related References</h3>
      <a href="../reference/preferences/java/debug/ref-installed_jres.htm">Installed JREs preference page</a>
  </body>
</html>

